package org.wsff.tools.api.gateway.impl.spring;

import org.springframework.context.ApplicationContext;

/**
 * SpringContextHolder
 * 
 * @author ryan
 * @version Id: SpringContextHolder.java, v 0.1 2022-02-11 17:34 ryan Exp $$
 */
public final class SpringContextHolder {

    static ApplicationContext CONTEXT;

    private SpringContextHolder() {
    }

    /**
     * 设置spring 上下文
     * 
     * @param applicationContext spring context
     */
    public static void setApplicationContext(ApplicationContext applicationContext) {
        CONTEXT = applicationContext;
    }

    /**
     * Gets the value of CONTEXT.
     *
     * @return the value of CONTEXT
     */
    public static ApplicationContext getContext() {
        return CONTEXT;
    }
}
